import axios from "axios";

const service = axios.create({
  //运行不同命令提供不同接口地址
  baseURL: import.meta.env.VITE_ADMIN_BASE_URL,
});

service.interceptors.request.use((config) => {
  config.headers.token = sessionStorage.getItem("token");
  return config;
});

service.interceptors.response.use((res) => {
  return res;
});

export default service;
